package com.lanyou.esb.cook.proxy.vo;

import com.lanyou.esb.cook.proxy.common.CommonUtils;

/**
 * 请求结果消息体
 * 
 * @author Davey.wu
 */
public class ResultMsg {
	private String resultCode;
	private String resultDesc;
	private ErrorMsg error;
	public static ResultMsg getInstance(String resultCode, String resultDesc) {
		ResultMsg msg = new ResultMsg();
		msg.resultCode = resultCode;
		msg.resultDesc = resultDesc;
		return msg;
	}

	public String toJson() {
		String result = "";
		try {
			result = CommonUtils.toJson(this);
		} catch (Exception e) {
			result = e.getMessage();
		}
		return result;
	}

	public String getResultCode() {
		return resultCode;
	}

	public void setResultCode(String resultCode) {
		this.resultCode = resultCode;
	}

	public String getResultDesc() {
		return resultDesc;
	}

	public void setResultDesc(String resultDesc) {
		this.resultDesc = resultDesc;
	}

	public ErrorMsg getError() {
		return error;
	}

	public void setError(ErrorMsg error) {
		this.error = error;
	}

}
